<template name='entrySignUp'>
  <div class="container">
    <div class="row">
      {{#if logo}}
        <div class="entry-logo">
            <a href="/"><img src="{{logo}}" alt="logo"></a>
        </div>
      {{/if}}
      <div class="entry col-md-4 col-md-offset-4">
        <h3>{{t9n "createAccount"}}</h3>
        {{#if otherLoginServices}}
          <p class="entry-signin-cta">{{t9n "ifYouAlreadyHaveAnAccount"}} <a href="{{pathFor 'entrySignIn'}}">{{t9n "signin"}}</a>.</p>
          <div class="entry-social">
            {{#each loginServices}}
              {{> entrySocial}}
            {{/each}}
            {{#if passwordLoginService}}
              <div class="email-option">
                <strong class="line-thru">{{t9n "OR"}}</strong>
                <a data-toggle="collapse" href="#signUp">
                  {{t9n "signUpWithYourEmailAddress"}}
                </a>
              </div>
            {{/if}}
          </div>
        {{else}}
            <p class="entry-signin-cta">{{t9n "ifYouAlreadyHaveAnAccount"}} <a href="{{pathFor 'entrySignIn'}}">{{t9n "signin"}}</a>.</p>
        {{/if}}
        {{> entryError}}
        {{#if passwordLoginService}}
          <form class="entry-form {{signupClass}}" id='signUp'>
            {{#if showUsername}}
              <div class="form-group">
                <label>{{t9n "username"}}</label>
                <input autofocus name="username" type="string" class="form-control" value=''>
              </div>
            {{/if}}

            {{#if showEmail}}
              <div class="form-group">
                <label>{{t9n "emailAddress"}}</label>
                {{#if showUsername}}
                  <input type="email" class="form-control" value='{{emailAddress}}'>
                {{else}}
                  <input autofocus type="email" class="form-control" value='{{emailAddress}}'>
                {{/if}}
              </div>
            {{/if}}

            <div class="form-group">
              <label>{{t9n "password"}}</label>
              <input type="password" class="form-control" value=''>
            </div>

            {{#if showSignupCode}}
              <div class="form-group">
                <label>{{t9n "signupCode"}}</label>
                <input name="signupCode" type="string" class="form-control" value=''>
              </div>
            {{/if}}

            {{> entryExtraSignUpFields}}
            <button type="submit" class="submit btn btn-block btn-default">{{t9n "signUp"}}</button>
          </form>
        {{/if}}
        {{#if both}}
          <p class="entry-agreement">{{t9n "clickAgree"}}
            <a href="{{privacyUrl}}">{{t9n "privacyPolicy"}}</a> {{t9n "and"}}
            <a href="{{termsUrl}}">{{t9n "terms"}}</a>.
          </p>
        {{else}}
          {{#unless neither}}
            <p class="entry-agreement">{{t9n "clickAgree"}}
              {{#if privacyUrl}}<a href="{{privacyUrl}}">{{t9n "privacyPolicy"}}</a>.{{/if}}
              {{#if termsUrl}}<a href="{{termsUrl}}">{{t9n "terms"}}</a>.{{/if}}
            </p>
          {{/unless}}
        {{/if}}
      </div>
    </div>
  </div>
</template>
